Controlling notification based on power expense and social factors

ABSTRACT

In one embodiment, a computer system determines a wireless transmit cost for each of one or more outgoing messages for a first user, and transmits to the first user&#39;s mobile device at least one of the one or more outgoing messages based on the mobile device&#39;s power state and respective wireless transmit costs of the one or more outgoing messages.

RELATED APPLICATIONS

This application is a continuation under 35 U.S.C. §120 of U.S. patentapplication Ser. No. 14/294,501, filed 3 Jun. 2014 and issued as U.S.Pat. No. 9,270,633, which is a continuation under 35 U.S.C. §120 of U.S.patent application Ser. No. 13/289,894, filed 4 Nov. 2011 and issued asU.S. Pat. No. 8,751,592, each of which is incorporated herein byreference.

TECHNICAL FIELD

This disclosure generally relates to data transmission.

BACKGROUND

A social networking system, such as a social networking website, enablesits users to interact with it and with each other through the system.The social networking system may create and store a record, oftenreferred to as a user profile, in connection with the user. The userprofile may include a user's demographic information, communicationchannel information, and personal interests. The social networkingsystem may also create and store a record of a user's relationship withother users in the social networking system (e.g., social graph), aswell as provide services (e.g., wall-posts, photo-sharing, or instantmessaging) to facilitate social interaction between users in the socialnetworking system.

The social networking system may transmit contents and messages relatedto its services to a user's client device over a network. A network canbe the Internet, a corporate intranet, a virtual private network, alocal area network, a wireless local area network, a wide area network,a metropolitan area network, or a combination of two or more suchnetworks.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example social networking system.

FIG. 2 illustrates an example method of managing transmission ofoutgoing messages for a user based on a transmit cost associated witheach outgoing message

FIG. 3 illustrates an example computer system.

FIG. 4 illustrates an example mobile device platform.

DETAILED DESCRIPTION

A social networking system, such as a social networking website, enablesits users to interact with it, and with each other through, the system.Typically, to become a registered user of a social networking system, anentity, either human or non-human, registers for an account with thesocial networking system. Thereafter, the registered user may log intothe social networking system via an account by providing, for example, alogin ID or username and password. As used herein, a “user” may be anindividual (human user), an entity (e.g., an enterprise, business, orthird party application), or a group (e.g., of individuals or entities)that interacts or communicates with or over such a social networkenvironment.

When a user registers for an account with a social networking system,the social networking system may create and store a record, oftenreferred to as a “user profile”, in connection with the user. The userprofile may include information provided by the user and informationgathered by various systems, including the social networking system,relating to activities or actions of the user. For example, the user mayprovide his name, profile picture, contact information, birth date,gender, marital status, family status, employment, education background,preferences, interests, and other demographical information to beincluded in his user profile. The user may identify other users of thesocial networking system that the user considers to be his friends. Alist of the user's friends or first degree contacts may be included inthe user's profile. Connections in social networking systems may be inboth directions or may be in just one direction. For example, if Bob andJoe are both users and connect with each another, Bob and Joe are eachconnections of the other. If, on the other hand, Bob wishes to connectto Sam to view Sam's posted content items, but Sam does not choose toconnect to Bob, a one-way connection may be formed where Sam is Bob'sconnection, but Bob is not Sam's connection. Some embodiments of asocial networking system allow the connection to be indirect via one ormore levels of connections (e.g., friends of friends). Connections maybe added explicitly by a user, for example, the user selecting aparticular other user to be a friend, or automatically created by thesocial networking system based on common characteristics of the users(e.g., users who are alumni of the same educational institution). Theuser may identify or bookmark websites or web pages he visits frequentlyand these websites or web pages may be included in the user's profile.

The user may provide information relating to various aspects of the user(such as contact information and interests) at the time the userregisters for an account or at a later time. The user may also updatehis or her profile information at any time. For example, when the usermoves, or changes a phone number, he may update his contact information.Additionally, the user's interests may change as time passes, and theuser may update his interests in his profile from time to time. A user'sactivities on the social networking system, such as frequency ofaccessing particular information on the system, may also provideinformation that may be included in the user's profile. Again, suchinformation may be updated from time to time to reflect the user'smost-recent activities. Still further, other users or so-called friendsor contacts of the user may also perform activities that affect or causeupdates to a user's profile. For example, a contact may add the user asa friend (or remove the user as a friend). A contact may also writemessages to the user's profile pages typically known as wall-posts. Auser may also input status messages that get posted to the user'sprofile page.

A social network system may maintain social graph information, which cangenerally model the relationships among groups of individuals, and mayinclude relationships ranging from casual acquaintances to closefamilial bonds. A social network may be represented using a graphstructure. Each node of the graph corresponds to a member of the socialnetwork. Edges connecting two nodes represent a relationship between twousers. In addition, the degree of separation between any two nodes isdefined as the minimum number of hops required to traverse the graphfrom one node to the other. A degree of separation between two users canbe considered a measure of relatedness between the two users representedby the nodes in the graph.

A social networking system may support a variety of applications, suchas photo sharing, on-line calendars and events. For example, the socialnetworking system may also include media sharing capabilities. Forexample, the social networking system may allow users to postphotographs and other multimedia files to a user's profile, such as in awall post or in a photo album, both of which may be accessible to otherusers of the social networking system. Social networking system may alsoallow users to configure events. For example, a first user may configurean event with attributes including time and date of the event, locationof the event and other users invited to the event. The invited users mayreceive invitations to the event and respond (such as by accepting theinvitation or declining it). Furthermore, social networking system mayallow users to maintain a personal calendar. Similarly to events, thecalendar entries may include times, dates, locations and identities ofother users.

The social networking system may also support a privacy model. A usermay or may not wish to share his information with other users orthird-party applications, or a user may wish to share his informationonly with specific users or third-party applications. A user may controlwhether his information is shared with other users or third-partyapplications through privacy settings associated with his user profile.For example, a user may select a privacy setting for each user datumassociated with the user and/or select settings that apply globally orto categories or types of user profile information. A privacy settingdefines, or identifies, the set of entities (e.g., other users,connections of the user, friends of friends, or third party application)that may have access to the user datum. The privacy setting may bespecified on various levels of granularity, such as by specifyingparticular entities in the social network (e.g., other users),predefined groups of the user's connections, a particular type ofconnections, all of the user's connections, all first-degree connectionsof the user's connections, the entire social network, or even the entireInternet (e.g., to make the posted content item index-able andsearchable on the Internet). A user may choose a default privacy settingfor all user data that is to be posted. Additionally, a user mayspecifically exclude certain entities from viewing a user datum or aparticular type of user data.

The social networking system may maintain a database of informationrelating to geographic locations or places. Places may correspond tovarious physical locations, such as restaurants, bars, train stations,airports and the like. In one implementation, each place can bemaintained as a hub node in a social graph or other data structuremaintained by the social networking system, as described in U.S. patentapplication Ser. No. 12/763,171, filed 19 Apr. 2010 and issued as U.S.Pat. No. 8,244,848, which is incorporated by reference herein for allpurposes. Social networking system may allow users to access informationregarding each place using a client application (e.g., a browser) hostedby a wired or wireless station, such as a laptop, desktop or mobiledevice. For example, social networking system may serve web pages (orother structured documents) to users that request information about aplace. In addition to user profile and place information, the socialnetworking system may track or maintain other information about theuser. For example, the social networking system may support geo-socialnetworking system functionality including one or more location-basedservices that record the user's location. For example, users may accessthe geo-social networking system using a special-purpose clientapplication hosted by a mobile device of the user (or a web- ornetwork-based application using a browser client). The clientapplication may automatically access Global Positioning System (GPS) orother geo-location functions supported by the mobile device and reportthe user's current location to the geo-social networking system. Inaddition, the client application may support geo-social networkingfunctionality that allows users to check-in at various locations andcommunicate this location to other users. A check-in to a given placemay occur when a user is physically located at a place and, using amobile device, access the geo-social networking system to register theuser's presence at the place. A user may select a place from a list ofexisting places near to the user's current location or create a newplace. The social networking system may automatically checks in a userto a place based on the user's current location and past location data,as described in U.S. patent application Ser. No. 13/042,357 filed onMar. 7, 2011 and issued as U.S. Pat. No. 9,083,747, which isincorporated by reference herein for all purposes. An entry including acomment and a time stamp corresponding to the time the user checked inmay be displayed to other users. For example, a record of the user'scheck-in activity may be stored in a database. Social networking systemmay select one or more records associated with check-in activities ofusers at a given place and include such check-in activity in web pages(or other structured documents) that correspond to a given place. Thecheck-in activity may also be displayed on a user profile page and innews feeds provided to users of the social networking system.

Still further, a special purpose client application hosted on a mobiledevice of a user may be configured to continuously capture location dataof the mobile device and send the location data to social networkingsystem. In this manner, the social networking system may track theuser's location and provide various recommendations to the user relatedto places that are proximal to the user's path or that are frequented bythe user. In one implementation, a user may opt in to thisrecommendation service, which causes the client application toperiodically post location data of the user to the social networkingsystem.

A social networking system may support a news feed service. A news feedis a data format typically used for providing users with frequentlyupdated content. A social networking system may provide various newsfeeds to its users, where each news feed includes content relating to aspecific subject matter or topic. Various pieces of content relating toa particular topic may be aggregated into a single news feed. The topicmay be broad such as various events related to users within a thresholddegree of separation of a subject user, and/or updates to pages that auser has liked or otherwise established a subscriber relationship.Individual users of the social networking system may subscribe tospecific news feeds of their interest. U.S. Pat. No. 7,669,123,incorporated by reference in its entirety for all purposes, describes asystem that can be used to dynamically provide a news feed in a socialnetworking system. A group of related actions may be presented togetherto a user of the social networking system in the same news feed. Forexample, a news feed concerning an event organized through the socialnetworking system may include information about the event, such as itstime, location, and attendees, and photos taken at the event, which havebeen uploaded to the social networking system. U.S. application Ser. No.12/884,010, incorporated by reference in its entirety for all purposes,describes a system that can be used to construct a news feed comprisingrelated actions and present the news feed to a user of the socialnetworking system.

FIG. 1 illustrates an example social networking system. In particularembodiments, the social networking system may store user profile dataand social graph information in user profile database 101. In particularembodiments, the social networking system may store user event data inevent database 102. For example, a user may register a new event byaccessing a client application to define an event name, a time and alocation, and cause the newly created event to be stored in eventdatabase 102. For example, a user may register with an existing event byaccessing a client application to confirming attending the event, andcause the confirmation to be stored in event database 102. In particularembodiments, the social networking system may store user privacy policydata in privacy policy database 103. In particular embodiments, thesocial networking system may store geographic and location data inlocation database 104. In particular embodiments, databases 101, 102,103, and 104 may be operably connected to the social networking system'sfront end 120 and news feed engine 110. In particular embodiments, thefront end 120 may interact with client device 122 through network cloud121. For example, the front end 120 may be implemented in softwareprograms hosted by one or more server systems. For example, eachdatabase such as user profile database 101 may be stored in one or morestorage devices. Client device 122 is generally a computer or computingdevice including functionality for communicating (e.g., remotely) over acomputer network. Client device 122 may be a desktop computer, laptopcomputer, personal digital assistant (PDA), in- or out-of-car navigationsystem, smart phone or other cellular or mobile phone, or mobile gamingdevice, among other suitable computing devices. Client device 122 mayexecute one or more client applications, such as a web browser (e.g.,Microsoft Windows Internet Explorer, Mozilla Firefox, Apple Safari,Google Chrome, and Opera, etc.) or special-purpose client application(e.g., Facebook for iPhone, etc.), to access and view content over acomputer network. Front end 120 may include web or HTTP serverfunctionality, as well as other functionality, to allow users to accessthe social networking system. Network cloud 121 generally represents anetwork or collection of networks (such as the Internet, a corporateintranet, a virtual private network, a local area network, a wirelesslocal area network, a wide area network, a metropolitan area network, ora combination of two or more such networks) over which client devices122 may access the social network system.

In particular embodiments, location database 104 may store aninformation base of places, where each place includes a name, ageographic location and meta information (such as the user thatinitially created the place, reviews, comments, check-in activity data,one or more web pages associated with the place and corresponding linksto the one or more web pages, and the like). Places may be created byadministrators of the system and/or created by users of the system. Forexample, a user may register a new place by accessing a clientapplication to define a place name and provide a geographic location andcause the newly created place to be registered in location database 104.As described in U.S. patent application Ser. No. 12/763,171, informationabout a created place may be stored in a hub node in a social graph,which an administrator can claim for purposes of augmenting theinformation about the place and for creating ads or other offers to bedelivered to users. In particular embodiments, system front end 120 mayconstruct and serve a web page of a place, as requested by a user. Insome embodiments, a web page of a place may include selectablecomponents for a user to “like” the place or check in to the place. Inparticular embodiments, location database 104 may store geo-locationdata identifying a real-world geographic location of a user associatedwith a check-in. For example, a geographic location of an Internetconnected computer can be identified by the computer's IP address. Forexample, a geographic location of a cell phone equipped with cellular,Wi-Fi and/or GPS capabilities can be identified by cell towertriangulation, Wi-Fi positioning, and/or GPS positioning. In particularembodiments, location database 104 may store a geographic location andadditional information of a plurality of places. For example, a placecan be a local business, a point of interest (e.g., Union Square in SanFrancisco, Calif.), a college, a city, or a national park. For example,a geographic location of a place (e.g., a local coffee shop) can be anaddress, a set of geographic coordinates (latitude and longitude), or areference to another place (e.g., “the coffee shop next to the trainstation”). For example, additional information of a place can bebusiness hours, photos, or user reviews of the place. In particularembodiments, location database 104 may store a user's location data. Forexample, a user can create a place (e.g., a new restaurant or coffeeshop) and the social networking system can store the created place inlocation database 104. For example, location database 104 may store auser's check-in activities. For example, location database 104 may storea user's geographic location provided by the user's GPS-equipped mobiledevice.

In particular embodiments, news feed engine 110 may access user profiledatabase 101, event database 102, and location database 104 for dataabout a particular user of the social networking system, and assemble alist of one or more activities as news items about the particular user.In particular embodiments, news feed engine 110 may access privacypolicy database 103 and determine a subset of news items based on one ormore privacy settings by the particular user. In particular embodiments,news feed engine 110 may compile a dynamic list of a limited number ofnews items about the particular user in a preferred order (i.e., a newsfeed). In particular embodiments, news feed engine 110 may provide linksrelated to one or more activities in the news items, and links providingopportunities to participate in the activities. For example, a news feedabout a user can comprise the user's wall posts, status updates,comments on other users' photos, and a recent check-in to a place (witha link to a web page of the place). In other embodiments, news feedengine 110 may access user profile database 101, event database 102, andlocation database 104 and compile a dynamic list of a number of newsitems about a group of related actions received from users of the socialnetworking system (i.e., a news feed). For example, a news feed cancomprise an event that a user may schedule and organize through thesocial networking system (with a link to participate the event),check-ins at a specific geographical location of the event by the userand other participants of the event, messages about the event posted bythe user and other participants of the event, and photos of the eventuploaded by the user and other participants of the event.

In response to a user's request to load or refresh a web page for thesocial networking system, the social networking system may transmit oneor more news items or news feed entries generated by news feed engine110 to the user's client device 122, causing an application (e.g., a webbrowser) running on the user's client device 122 to display the one ormore news feed entries in the application's user interface. The socialnetworking system may initiate and transmit (or push) one or more newsfeed entries to a user's client device 122. For example, the socialnetworking system may periodically accessing news feed engine 110 forone or more news feed entries that have not been consumed by a user, andtransmit the one or more news feed entries to the user's client device122. For example, news feed engine 110 may generate a news feed entryfor a user (e.g., a news feed entry about an event just created by theuser's roommate), causing the social networking system to transmit thenews feed entry to the user's client device 122.

In addition to a news item or news feed entry, the social networkingsystem may transmit other types of messages to a user. For example andwithout limitation, a messages can be an email, an instant message (IM),an Short Message Service (SMS) message, an Multimedia Messaging Service(MMS) message, an advertisement, a system update message, or anycombinations of those. The social networking system may also transmit toa user an message or notification indicating a request to establish areal-time communication session (e.g., a phone call, a video call).

A mobile device (e.g., a mobile phone, a tablet computer) often runssolely on its battery. With abundance of messages (such as describedabove) available for a user to consume at the user's mobile device, itis desirable to manage message transmission to the user's mobile devicein order to conserve the mobile device's battery power. Meanwhile, itmay not be of high importance to manage message transmission to theuser's mobile device if the mobile device is currently plugged in to awall outlet (i.e., the mobile device's battery is being charged).Particular embodiments herein describe methods of managing transmissionof outgoing messages for a user based on a transmit cost associated witheach outgoing message. For example, particular embodiments can access apool of outgoing messages for a user, and calculate a transmit cost(e.g., in energy consumption) for each message in the pool of outgoingmessages based on a size (e.g., in bytes) of the each message. Forexample, particular embodiments can transmit one or more outgoingmessages with the lowest transmit costs (e.g., smallest in sizes) to theuser first, and store the rest of outgoing messages from the pool ofoutgoing messages in a queue for later transmission.

FIG. 2 illustrates an example method of managing transmission ofoutgoing messages for a user based on a transmit cost associated witheach outgoing message. The example method of FIG. 2 can be implementedby a notification manager process hosted by one or more computingdevices of the social networking system. In particular embodiments, thenotification manager process may receive, from a mobile device of afirst user, a first message comprising the mobile device's power stateand radio network state (201). A mobile device can be a mobile phone, atablet computer, a laptop computer, a handheld game console, anelectronic book reader, or any other suitable portable devices. Inparticular embodiments, the power state may indicate a level of energyavailable in the mobile device's battery (e.g., measured in percentagesuch as 75% charged, or measured in an absolute value such as 900 mAh).In particular embodiments, the power state may indicate whether themobile device's battery is being charged. In particular embodiment, theradio network state may comprise one or more radio networks that themobile device is currently connected to (e.g., a WI-FI network, a GlobalSystem for Mobile Communications or GSM cellular network, a Long TermEvolution or LTE network). In particular embodiments, the radio networkstate may further comprise an indication of signal strength of thecurrent radio network connection (e.g., measured in dBm, or in arelative term such as 4 out of 5 bars). For example, a special-purposeclient application (or a background process) running on one or moreprocessors of the first user's mobile device may periodically accessdevice drivers of the mobile device's battery and radio communicationsubsystem and transmit to social networking system a message includingthe mobile device's power state and radio network state. For example,the special-purpose client application (or the background process) maydetect a change in the mobile device's radio network state (e.g.,changing from a WI-FI network connection to a cellular networkconnection) and/or a change in the mobile device's power state (e.g.,changing from a first state of 20% charged to a second stat of beingcharged currently), and transmit to the social networking system amessage updating the mobile device's power state and/or radio networkstate.

In particular embodiments, the notification manager process may accessone or more services indicating one or more outgoing messages for thefirst user (202). In particular embodiments, the notification managerprocess may access one or more message services 112 operably connectedto the social networking system (as illustrated in FIG. 1) forinformation of one or more outgoing messages for the first user. Forexample, message service 112 can be one or more computing devicesconfigured to deliver messages to users of the social networking systemFor example and without limitation, an outgoing message can be a newsitem or news feed entry, an email, an IM, an SMS message, an MMSmessage, an advertisement, a system update message, a notification for arequest to establish a real-time communication session, or anycombination of those as described earlier. In particular embodiments,information of an outgoing message for the first user may comprise oneor more identifiers (e.g., a user name, a phone number, an emailaddress) of the outgoing message's originator, and a size (e.g., inbytes) of the outgoing message.

In particular embodiments, the notification manager process maydetermine a transmit cost for each of the outgoing messages (203). Inparticular embodiments, the notification manager process may determine atransmit cost in energy consumption by the mobile device for receivingan outgoing message based on a size of the outgoing message and themobile device's current radio network state. For example, thenotification manager process can calculate a first energy consumptionnumber (e.g., in mA) by the mobile device for receiving the outgoingmessage itself by multiplying a radio power consumption number of aradio transceiver of the mobile device (e.g., in mA/s) by a size (e.g.,in bytes) of the outgoing message and a bandwidth (e.g., in bytes/s) ofa radio network that the mobile device is connected to. The notificationmanager process can calculate a second energy consumption number (e.g.,in mA) by the mobile device for establishing a wireless communicationsession for receiving the outgoing message by multiplying the radiopower consumption number (e.g., in mA/s) by a time duration (e.g., inseconds) of establishing the wireless communication session (e.g.,including power-up and power-down of the radio transceiver). Forexample, the notification manager process can determine a transmit costin energy consumption by a summation of the first energy consumptionnumber and the second energy consumption number. The radio powerconsumption number and the bandwidth described above may depend on themobile device's model and/or the radio network that the mobile device isconnected to. The notification manager process can access a data storefor values for the radio power consumption number and the bandwidth ofthe radio network (e.g., provided by a wireless communication carrierand/or a device manufacturer).

In some embodiments, the notification manager process may adjust thetransmit cost in energy consumption based on a signal strength of thecurrent radio network connection. For example, a radio networkconnection of a weaker signal strength (e.g., 1 out of 5 bars) may havea lower effective bandwidth due to dropped packets. For example, thenotification manager process may adjust the transmit cost in energyconsumption by adjusting the first energy consumption number describedabove with a lower bandwidth value, and/or adjusting the second energyconsumption number described above with a longer time duration forestablishing the wireless communication session.

In particular embodiments, the notification manager process maydetermine a value of the one or more outgoing messages. In particularembodiments, the notification manager process may determine a value ofthe one or more outgoing messages based on respective transmit costs ofthe one or more outgoing messages (204). For example, the notificationmanager process can prioritize the outgoing messages by assigning apriority score of 1.0 to an outgoing message if the outgoing message hasa transmit cost in energy consumption of less than 100 mA·s, 0.8 if theoutgoing message has a transmit cost in energy consumption of between100 and 500 mA·s, 0.5 if the outgoing message has a transmit cost inenergy consumption of between 500 and 1000 mA·s, and 0.2 if the outgoingmessage has a transmit cost in energy consumption of more than 1000mA·s.

In particular embodiments, the notification manager process maydetermine a value of the one or more outgoing messages further based onan affinity between each of the one or more outgoing messages and thefirst user—i.e., based on an affinity between each outgoing message'soriginator and the first user. For example, the notification managerprocess may assign each of the one or more outgoing messages an affinitycoefficient. For example, the notification manager process can assign anaffinity coefficient of 1.0 to an outgoing message if the outgoingmessage's originator is the first user's immediate family members (e.g.,parents, siblings), or an affinity coefficient of 0.9 if the outgoingmessage's originator frequently communicates with the first user, or anaffinity coefficient of 0.7 if the outgoing message's originator is thefirst user's first-degree social contact. Interactions between users onsocial networking system, such as chats, wall posts, emails, and thelike, can also be used in scoring affinities between users. A system formeasuring user affinity is described more generally in U.S. patentapplication Ser. No. 11/503,093, filed on Aug. 11, 2006, which is herebyincorporated by reference in its entirety and for all purposes. Inparticular embodiments, the notification manager process may adjust apriority score of an outgoing message based on an affinity coefficientof the outgoing message. For example, the notification manager processcan adjust a priority score of an outgoing message by multiplying thepriority score with the outgoing message's affinity coefficient.

In one embodiment, the notification manager process may determine avalue of the one or more outgoing messages based on a type of the one ormore outgoing messages. For example, the notification manager processcan assign a priority score of 1.0 for a request for establishing aphone call session, 0.8 for an SMS message or an IM message, 0.6 for anews feed entry, 0.4 for an email message, and 0.2 for all other typesof messages.

In particular embodiments, the notification manager process may transmitat least one outgoing message to the mobile device based on respectivevalues of the one or more outgoing messages (205). In particularembodiments, the notification manager process may select one or more ofthe one or more outgoing messages based on respective values of the oneor more outgoing messages. In particular embodiments, the notificationmanager process may transmit the selected one or more outgoing messagesto the mobile device. For example, the notification manager process canselect outgoing messages with priority scores greater than apre-determined threshold (e.g., 0.6), and transmit the selected messagesto the first user's mobile device. The notification manger process mayadjust the threshold based on the mobile device's power state. Forexample, the notification manager process can transmit to the mobiledevice only high priority messages (e.g., by using a high thresholdvalue such as 0.8) if the mobile device's battery level is low (e.g.,less than 20% charged) to extend battery life. For example, thenotification manager process can transmit most of the outgoing messagesto the mobile device by using a lower threshold value (e.g., 0.4) if themobile device's battery level is high (e.g., greater than 80% charged)or the mobile device's battery is currently being charged. In oneembodiment, the notification manager process may transmit all of theoutgoing messages to the mobile device if the mobile device's batterylevel is high or the mobile device's battery is currently being charged.

In addition to transmitting to the mobile device outgoing messages withhighest priority scores, particular embodiments may store one or moreremaining outgoing messages in a queue and transmit to the mobile deviceat a later time. In particular embodiments, the notification managerprocess may select and store in a queue one or more of the one or moreoutgoing messages based on the respective values of the one or moreoutgoing messages and the mobile device's power state. For example, thenotification manager process may select outgoing messages with priorityscores of less than 0.4 and store the selected messages in a queue ifthe mobile device's battery level is more than 80% charged or the mobiledevice's battery is currently being charged. For example, thenotification manager process may select outgoing messages with priorityscores of less than 0.8 and store the selected messages in a queue ifthe mobile device's battery level is less than 20% charged—i.e., thenotification manager process may select and store more lower-prioritymessages in a queue if the mobile device's battery level is low.

In particular embodiments, the notification manager process may transmitat least one of the queued one or more outgoing messages to the mobiledevice at a later instance of time. For example, the notificationmanager process may transmit at least one of the queued one or moreoutgoing messages to the mobile device at a pre-determined time interval(e.g., every 30 minutes). For example, the notification manager processmay transmit at least one of the queued one or more outgoing messages tothe mobile device when a size of the queue is greater than apre-determined threshold (e.g., when the queue has more than 30 queuedmessages). For example, the notification manager process may transmit atleast one of the queued one or more outgoing messages to the mobiledevice when a real-time outgoing message (e.g., a phone call, a voiceall) is transmitted to the mobile device. For example, the notificationmanager process may transmit at least one of the queued one or moreoutgoing messages to the mobile device when an high priority outgoingmessage (e.g., a message with a priority score greater than 0.9) istransmitted to the mobile device. By storing outgoing messages in aqueue and transmitting the queued messages (with or without other highpriority messages) to the mobile device at a later instance of time in asame wireless communication session (“piggy-backing”), the effectivetransmit cost for each message (e.g., in energy consumption) can belower since multiple messages share a same energy consumption cost forestablishing the same wireless communication session.

In some embodiments, the notification manager process may transmit atleast one of the queued one or more outgoing messages to the mobiledevice when the mobile device's power state and/or radio network statechange. For example, the first user may connect the mobile device to awall power outlet (via a battery charging cable), causing a backgroundprocess running on one or more processors of the mobile device totransmit to the social networking system a message indicating a newpower state (that the mobile device's battery is currently beingcharged). In response to the message, the notification manager processcan transmit all queued outgoing messages to the mobile device, sincethe mobile device is no longer energy constrained. For example, thewireless communication subsystem of the mobile device may switch from aGSM network to a WI-FI network, causing a background process running onone or more processors of the mobile device to transmit to the socialnetworking system a message indicating a new radio network state (i.e.,the WI-FI network connection). In response to the message, thenotification manager process can transmit all queued outgoing messagesto the mobile device, since the mobile device is no longer bandwidthconstrained. For example, the wireless communication subsystem of themobile device may switch to a low-bandwidth network (e.g., secondgeneration or 2G cellular network) or detect a weak signal strength of awireless connection (e.g., 1 out of 5 bars), causing a backgroundprocess running on one or more processors of the mobile device totransmit to the social networking system a message indicating a newradio network state (e.g., a 2G connection, or weak signal strength). Inresponse to the message, the notification manager process can transmitonly higher-priority messages (e.g., outgoing messages with priorityscores of greater than 0.8) to the mobile device, in order to extendbattery life.

Particular embodiments may transmit one or more outgoing messages to themobile device based on the first user's location data. In particularembodiments, the notification manager process may access one or moredata stores (e.g., location database 104) for the first user's locationdata. In particular embodiments, the notification manager process maytransmit at least one of the one or more outgoing messages further basedon the first user's location. For example, the notification managerprocess can transmit all outgoing messages to the first user's mobiledevice regardless the mobile device's battery level, if the first useris at or near a location where the first user can charge the mobiledevice (e.g., a location with easy access to a power outlet). A locationwhere the first user can charge the mobile device can be a knownlocation (e.g., home, work). A location where the first user can chargethe mobile device can be a recorded location where the first user hascharged the mobile device before. For example, the notification managerprocess or a server-side process of the social networking system canstore (e.g., in location database 104) one or more locations wherein themobile device has been charged (e.g., based on one or more power statestransmitted from the mobile device).

Particular embodiments may access one or more data stores (e.g., eventdatabase 102) for the first user's current or future activities, andtransmit one or more outgoing messages to the mobile device based on thefirst user's current or future activities. For example, the notificationmanager process may store a majority of outgoing messages in a queue toconserve the mobile device's battery level if the first user is going toan event (or is at an event) where the first user does not access to apower outlet for an extended period of time (e.g., 5 hours).

Particular embodiments may transmit one or more outgoing messages to themobile device based on the first user's interaction with the mobiledevice. For example, the wireless communication subsystem of the mobiledevice may determine that the first user is using the mobile device fora real-time communication session (e.g., a phone call, a voice call),causing a background process running on one or more processors to sendto the social networking system a message indicating the mobile devicebeing used for a real-time communication session. In response to themessage, the notification manager process can transmit to the mobiledevice only very high ranking messages (e.g., outgoing messages withpriority scores of greater than 0.9) to the mobile device, in order tominimize the risk of disrupting the real-time communication session(e.g., causing the phone call being dropped).

FIG. 3 illustrates an example computer system 600. This disclosurecontemplates any suitable number of computer systems 600. Thisdisclosure contemplates computer system 600 taking any suitable physicalform. As example and not by way of limitation, computer system 600 maybe an embedded computer system, a system-on-chip (SOC), a desktopcomputer system, a mobile computer system, a game console, a mainframe,a mesh of computer systems, a server, or a combination of two or more ofthese. Where appropriate, computer system 600 may include one or morecomputer systems 600; be unitary or distributed; span multiplelocations; span multiple machines; or reside in a cloud, which mayinclude one or more cloud components in one or more networks. Whereappropriate, one or more computer systems 600 may perform withoutsubstantial spatial or temporal limitation one or more steps of one ormore methods described or illustrated herein. As an example and not byway of limitation, one or more computer systems 600 may perform in realtime or in batch mode one or more steps of one or more methods describedor illustrated herein. One or more computer systems 600 may perform atdifferent times or at different locations one or more steps of one ormore methods described or illustrated herein, where appropriate.

In particular embodiments, computer system 600 includes a processor 602,memory 604, storage 606, an input/output (I/O) interface 608, acommunication interface 610, and a bus 612. In particular embodiments,processor 602 includes hardware for executing instructions, such asthose making up a computer program. As an example and not by way oflimitation, to execute instructions, processor 602 may retrieve (orfetch) the instructions from an internal register, an internal cache,memory 604, or storage 606; decode and execute them; and then write oneor more results to an internal register, an internal cache, memory 604,or storage 606. In particular embodiments, processor 602 may include oneor more internal caches for data, instructions, or addresses. Inparticular embodiments, memory 604 includes main memory for storinginstructions for processor 602 to execute or data for processor 602 tooperate on. As an example and not by way of limitation, computer system600 may load instructions from storage 606 to memory 604. Processor 602may then load the instructions from memory 604 to an internal registeror internal cache. To execute the instructions, processor 602 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 602 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor602 may then write one or more of those results to memory 604. One ormore memory buses (which may each include an address bus and a data bus)may couple processor 602 to memory 604. Bus 612 may include one or morememory buses, as described below. In particular embodiments, one or morememory management units (MMUs) reside between processor 602 and memory604 and facilitate accesses to memory 604 requested by processor 602. Inparticular embodiments, memory 604 includes random access memory (RAM).This RAM may be volatile memory, where appropriate Where appropriate,this RAM may be dynamic RAM (DRAM) or static RAM (SRAM).

In particular embodiments, storage 606 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 606may include an HDD, a floppy disk drive, flash memory, an optical disc,a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB)drive or a combination of two or more of these. Storage 606 may includeremovable or non-removable (or fixed) media, where appropriate. Storage606 may be internal or external to computer system 600, whereappropriate. In particular embodiments, storage 606 is non-volatile,solid-state memory. In particular embodiments, storage 606 includesread-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), orflash memory or a combination of two or more of these.

In particular embodiments, I/O interface 608 includes hardware,software, or both providing one or more interfaces for communicationbetween computer system 600 and one or more I/O devices. Computer system600 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 600. As an example and not by way of limitation, anI/O device may include a keyboard, microphone, display, touch screen,mouse, speaker, camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 608 for them. Where appropriate, I/O interface 608 mayinclude one or more device or software drivers enabling processor 602 todrive one or more of these I/O devices. I/O interface 608 may includeone or more I/O interfaces 608, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 610 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 600 and one or more other computer systems 600 or one ormore networks. As an example and not by way of limitation, communicationinterface 610 may include a network interface controller (NIC) forcommunicating with an Ethernet or other wire-based network or a wirelessNIC (WNIC) for communicating with a wireless network, such as a WI-FInetwork. This disclosure contemplates any suitable network and anysuitable communication interface 610 for it. As an example and not byway of limitation, computer system 600 may communicate with an ad hocnetwork, a personal area network (PAN), a local area network (LAN), awide area network (WAN), a metropolitan area network (MAN), or one ormore portions of the Internet or a combination of two or more of these.One or more portions of one or more of these networks may be wired orwireless. As an example, computer system 600 may communicate with awireless PAN (WPAN) (e.g., a BLUETOOTH WPAN), a WI-FI network (e.g., a802.11a/b/g/n WI-FI network,), a WI-MAX network, a cellular telephonenetwork (e.g., a Global System for Mobile Communications (GSM) network,a Long Term Evolution (LTE) network), or other suitable wireless networkor a combination of two or more of these.

In particular embodiments, bus 612 includes hardware, software, or bothcoupling components of computer system 600 to each other. As an exampleand not by way of limitation, bus 612 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an INFINIBAND interconnect, a low-pin-count (LPC) bus, amemory bus, a Peripheral Component Interconnect Express or PCI-Expressbus, a serial advanced technology attachment (SATA) bus, aInter-Integrated Circuit (I2C) bus, a Secure Degital (SD) memoryinterface, a Secure Digital Input Output (SDIO) interface, a UniversalSerial Bus (USB) bus, a General Purpose Input/Output (GPIO) bus, oranother suitable bus or a combination of two or more of these. Bus 612may include one or more buses 612, where appropriate.

The client-side functionality described above can be implemented as aseries of instructions stored on a computer-readable storage mediumthat, when executed, cause a programmable processor to implement theoperations described above. While the client device 122 may beimplemented in a variety of different hardware and computing systems,FIG. 4 shows a schematic representation of the main components of anexample computing platform of a client or mobile device, according tovarious particular embodiments. In particular embodiments, computingplatform 702 may comprise controller 704, memory 706, and input outputsubsystem 710. In particular embodiments, controller 704 which maycomprise one or more processors and/or one or more microcontrollersconfigured to execute instructions and to carry out operationsassociated with a computing platform. In various embodiments, controller704 may be implemented as a single-chip, multiple chips and/or otherelectrical components including one or more integrated circuits andprinted circuit boards. Controller 704 may optionally contain a cachememory unit for temporary local storage of instructions, data, orcomputer addresses. By way of example, using instructions retrieved frommemory, controller 704 may control the reception and manipulation ofinput and output data between components of computing platform 702. Byway of example, controller 704 may include one or more processors or oneor more controllers dedicated for certain processing tasks of computingplatform 702, for example, for 2D/3D graphics processing, imageprocessing, or video processing.

Controller 704 together with a suitable operating system may operate toexecute instructions in the form of computer code and produce and usedata. By way of example and not by way of limitation, the operatingsystem may be Windows-based, Mac-based, or Unix or Linux-based, orSymbian-based, among other suitable operating systems. The operatingsystem, other computer code and/or data may be physically stored withinmemory 706 that is operatively coupled to controller 704.

Memory 706 may encompass one or more storage media and generally providea place to store computer code (e.g., software and/or firmware) and datathat are used by computing platform 702. By way of example, memory 706may include various tangible computer-readable storage media includingRead-Only Memory (ROM) and/or Random-Access Memory (RAM). As is wellknown in the art, ROM acts to transfer data and instructionsuni-directionally to controller 704, and RAM is used typically totransfer data and instructions in a bi-directional manner. Memory 706may also include one or more fixed storage devices in the form of, byway of example, hard disk drives (HDDs), solid-state drives (SSDs),flash-memory cards (e.g., Secured Digital or SD cards), among othersuitable forms of memory coupled bi-directionally to controller 704.Information may also reside on one or more removable storage medialoaded into or installed in computing platform 702 when needed. By wayof example, any of a number of suitable memory cards (e.g., SD cards)may be loaded into computing platform 702 on a temporary or permanentbasis.

Input output subsystem 710 may comprise one or more input and outputdevices operably connected to controller 704. For example, input outputsubsystem may include keyboard, mouse, one or more buttons, and/or,display (e.g., liquid crystal display (LCD), or any other suitabledisplay technology). Generally, input devices are configured to transferdata, commands and responses from the outside world into computingplatform 702. The display is generally configured to display a graphicaluser interface (GUI) that provides an easy to use visual interfacebetween a user of the computing platform 702 and the operating system orapplication(s) running on the mobile device. Generally, the GUI presentsprograms, files and operational options with graphical images. Duringoperation, the user may select and activate various graphical imagesdisplayed on the display in order to initiate functions and tasksassociated therewith. Input output subsystem 710 may also include touchbased devices such as touch pad and touch screen. A touchpad is an inputdevice including a surface that detects touch-based inputs of users.Similarly, a touch screen is a display that detects the presence andlocation of user touch inputs. Input output system 710 may also includedual touch or multi-touch displays or touch pads that can identify thepresence, location and movement of more than one touch inputs, such astwo or three finger touches.

In particular embodiments, computing platform 702 may additionallycomprise audio subsystem 712, camera subsystem 712, wirelesscommunication subsystem 716, sensor subsystems 718, and/or wiredcommunication subsystem 720, operably connected to controller 704 tofacilitate various functions of computing platform 702. For example,Audio subsystem 712, including a speaker, a microphone, and a codecmodule configured to process audio signals, can be utilized tofacilitate voice-enabled functions, such as voice recognition, voicereplication, digital recording, and telephony functions. For example,camera subsystem 712, including an optical sensor (e.g., a chargedcoupled device (CCD), image sensor), can be utilized to facilitatecamera functions, such as recording photographs and video clips. Forexample, wired communication subsystem 720 can include a UniversalSerial Bus (USB) port for file transferring, or a Ethernet port forconnection to a local area network (LAN). Additionally, computingplatform 702 may be powered by power source 732.

Wireless communication subsystem 716 can be designed to operate over oneor more wireless networks, for example, a wireless PAN (WPAN) (e.g., aBLUETOOTH), a WI-FI network (e.g., an 802.11a/b/g/n network), a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network, a Long Term Evolution(LTE) network). Additionally, wireless communication subsystem 716 mayinclude hosting protocols such that computing platform 702 may beconfigured as a base station for other wireless devices. Otherinput/output devices may include an accelerometer that can be used todetect the orientation of the device.

Sensor subsystem 718 may include one or more sensor devices to provideadditional input and facilitate multiple functionalities of computingplatform 702. For example, sensor subsystems 718 may include GPS sensorfor location positioning, altimeter for altitude positioning, motionsensor for determining orientation of a mobile device, light sensor forphotographing function with camera subsystem 714, temperature sensor formeasuring ambient temperature, and/or biometric sensor for securityapplication (e.g., fingerprint reader).

In particular embodiments, various components of computing platform 702may be operably connected together by one or more buses (includinghardware and/or software). As an example and not by way of limitation,the one or more buses may include an Accelerated Graphics Port (AGP) orother graphics bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a PeripheralComponent Interconnect Express PCI-Express bus, a serial advancedtechnology attachment (SATA) bus, a Inter-Integrated Circuit (I2C) bus,a Secure Degital (SD) memory interface, a Secure Digital Input Output(SDIO) interface, a Universal Serial Bus (USB) bus, a General PurposeInput/Output (GPIO) bus, an Advanced Microcontroller Bus Architecture(AMBA) bus, or another suitable bus or a combination of two or more ofthese. Additionally, computing platform 702 may be powered by powersource 732.

Herein, reference to a computer-readable storage medium encompasses oneor more non-transitory, tangible computer-readable storage mediapossessing structure. As an example and not by way of limitation, acomputer-readable storage medium may include a semiconductor-based orother integrated circuit (IC) (such, as for example, afield-programmable gate array (FPGA) or an application-specific IC(ASIC)), a hard disk, an HDD, a hybrid hard drive (HHD), an opticaldisc, an optical disc drive (ODD), a magneto-optical disc, amagneto-optical drive, a floppy disk, a floppy disk drive (FDD),magnetic tape, a holographic storage medium, a solid-state drive (SSD),a RAM-drive, a SECURE DIGITAL card, a SECURE DIGITAL drive, or anothersuitable computer-readable storage medium or a combination of two ormore of these, where appropriate. Herein, reference to acomputer-readable storage medium excludes any medium that is noteligible for patent protection under 35 U.S.C. §101. Herein, referenceto a computer-readable storage medium excludes transitory forms ofsignal transmission (such as a propagating electrical or electromagneticsignal per se) to the extent that they are not eligible for patentprotection under 35 U.S.C. §101. A computer-readable non-transitorystorage medium may be volatile, non-volatile, or a combination ofvolatile and non-volatile, where appropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

This disclosure encompasses all changes, substitutions, variations,alterations, and modifications to the example embodiments herein that aperson having ordinary skill in the art would comprehend. Moreover,reference in the appended claims to an apparatus or system or acomponent of an apparatus or system being adapted to, arranged to,capable of, configured to, enabled to, operable to, or operative toperform a particular function encompasses that apparatus, system,component, whether or not it or that particular function is activated,turned on, or unlocked, as long as that apparatus, system, or componentis so adapted, arranged, capable, configured, enabled, operable, oroperative.

What is claimed is:
 1. A method comprising, by one or more computingdevices of a social-networking system: receiving, from a mobile deviceof a first user, an indication of a radio-network state of the mobiledevice of the first user; identifying a plurality of messages to be sentto the mobile device of the first user from one or more mobile deviceseach associated with second user, each of the plurality of messageshaving a message size; determining, for each message of the plurality ofmessages, a transmit cost of the message based at least in part on theradio-network state of the mobile device of the first user and themessage size of the message, and a value of the message; determining apriority score for each message of the plurality of messages based atleast in part on the transmit cost and the value of each of themessages; and transmitting at least one message of the plurality ofmessages to the mobile device of the first user based at least in parton the priority score associated with the message.
 2. The method ofclaim 1, wherein the determining of the value of each of the messages isbased at least in part on determining an affinity between the first userand each of the second users.
 3. The method of claim 2, wherein thefirst user and each of the second users are users of thesocial-networking system, wherein the social-networking system comprisesa social graph that comprises a plurality of nodes and a plurality ofedges connecting the nodes, each of the edges between two of the nodesrepresenting a single degree of separation between the nodes, andwherein the first user is associated with a first node of the socialgraph, the second users are each associated with a second node of aplurality of second nodes of the social graph, and the first node andeach of the plurality of second nodes are connected by at least one edgeof the social graph.
 4. The method of claim 3, wherein the affinitybetween the first user and each of the second users is determined basedon a number of degrees of separation between the first node associatedwith the first user and the second node associated with each of thesecond users.
 5. The method of claim 4, further comprising: assigning anaffinity coefficient to each of the plurality of messages based on thenumber of degrees of separation between the first node of the first userand the second node of the second user associated with each of themessages, wherein the transmitting of the at least one of the messagesto the mobile device of the first user is based at least in part on theaffinity coefficient of the message being equal to or more than apredetermined affinity coefficient.
 6. The method of claim 5, whereinthe determining of the value of each of the messages is further based atleast in part on determining a type of each message, and wherein thepriority score for each message of the plurality of messages is furtherbased at least in part on the type of the message.
 7. The method ofclaim 1, wherein the radio-network state of the mobile device of thefirst user comprises: a radio network that the mobile device of thefirst user is connected to; a signal strength of the connection; or abandwidth of the connection.
 8. The method of claim 1, wherein, for eachof the messages, the transmit cost is based at least in part on a firstenergy-consumption number that is based at least in part on: a radiopower-consumption number that is based at least in part on: a radionetwork that the mobile device of the first user is connected to; andthe mobile device of the first user; the size of the message; and abandwidth of the connection of the mobile device of the first user tothe radio network.
 9. The method of claim 8, wherein the transmit costof the message is further based at least in part on a secondenergy-consumption number that is based at least in part on: the radiopower-consumption number; and a time duration of establishing acommunication session to send the message to the mobile device of thefirst user.
 10. One or more computer-readable non-transitory storagemedia embodying software that is operable when executed to: receive,from a mobile device of a first user, an indication of a radio-networkstate of the mobile device of the first user; identify a plurality ofmessages to be sent to the mobile device of the first user from one ormore mobile devices each associated with a second user, each of theplurality of messages having a message size; determine, for each messageof the plurality of messages, a transmit cost of the message based atleast in part on the radio-network state of the mobile device of thefirst user and the message size of the message, and a value of themessage; determine a priority score for each message of the plurality ofmessages based at least in part on the transmit cost and the value ofeach of the messages; and transmit at least one message of the pluralityof messages to the mobile device of the first user based at least inpart on the priority score associated with the message.
 11. The media ofclaim 10, wherein the determining of the value of each of the messagesis based at least in part on determining an affinity between the firstuser and each of the one or more second users.
 12. The media of claim11, wherein the first user and each of the second users are users of asocial-networking system, wherein the social-networking system comprisesa social graph that comprises a plurality of nodes and a plurality ofedges connecting the nodes, each of the edges between two of the nodesrepresenting a single degree of separation between the nodes, andwherein the first user is associated with a first node of the socialgraph, the second users are each associated with a second node of aplurality of second nodes of the social graph, and the first node andeach of the plurality of second nodes are connected by at least one edgeof the social graph.
 13. The media of claim 12, wherein the affinitybetween the first user and each of the one or more second users isdetermined based on a number of degrees of separation between the firstnode of the first user and the second node of each of the one or moresecond users.
 14. The media of claim 13, wherein the computer-readablenon-transitory storage media is further executed to: assign an affinitycoefficient to each of the plurality of messages based on the number ofdegrees of separation between the first node of the first user and thesecond node of the second user associated with each of the messages,wherein the transmitting of the at least one of the messages to themobile device of the first user is based at least in part on theaffinity coefficient of the message being equal to or more than apredetermined affinity coefficient.
 15. The media of claim 14, whereinthe determining of the value of each of the messages is further based atleast in part on determining a type of each message of the plurality ofmessages, and wherein the priority score for each message of theplurality of messages is further based at least in part on the type ofthe message.
 16. The media of claim 10, wherein the radio-network stateof the mobile device of the first user comprises: a radio network thatthe mobile device of the first user is connected to; a signal strengthof the connection; or a bandwidth of the connection.
 17. The media ofclaim 10, wherein, for each of the messages, the transmit cost is basedat least in part on a first energy-consumption number that is based atleast in part on: a radio power-consumption number that is based atleast in part on: a radio network that the mobile device of the firstuser is connected to; and the mobile device of the first user; the sizeof the message; and a bandwidth of the connection of the mobile deviceof the first user to the radio network.
 18. The media of claim 17,wherein the transmit cost of the message is further based at least inpart on a second energy-consumption number that is based at least inpart on: the radio power-consumption number; and a time duration ofestablishing a communication session to send the message to the mobiledevice of the first user.
 19. A system comprising: one or moreprocessors; and a non-transitory memory coupled to the processorscomprising instructions executable by the processors, the processorsoperable when executing the instructions to: receive, from a mobiledevice of a first user, an indication of a radio-network state of themobile device of the first user; identify a plurality of messages to besent to the mobile device of the first user from one or more mobiledevices each associated with a second user, each of the plurality ofmessages having a message size; determine, for each message of theplurality of messages, a transmit cost of the message based at least inpart on the radio-network state of the mobile device of the first userand the message size of the message, and a value of the message;determine a priority score for each message of the plurality of messagesbased at least in part on the transmit cost and the value of each of themessages; and transmit at least one message of the plurality of messagesto the mobile device of the first user based at least in part on thepriority score associated with the message.
 20. The system of claim 19,wherein the determining of the value of each of the messages is based atleast in part on determining an affinity between the first user and eachof the one or more second users, wherein the first user and each of thesecond users are users of a social-networking system, wherein thesocial-networking system comprises a social graph that comprises aplurality of nodes and a plurality of edges connecting the nodes, eachof the edges between two of the nodes representing a single degree ofseparation between the nodes, and wherein the first user is associatedwith a first node of the social graph, the second users are eachassociated with a second node of a plurality of second nodes of thesocial graph, and the first node and each of the plurality of secondnodes are connected by at least one edge of the social graph.